{extend name="admin@public/base" /}
{block name="main-content"}
	<div class="page-content">
		<link rel="stylesheet" type="text/css" media="all" href="__PUBLIC__/sldate/daterangepicker-bs3.css" />
		<form name="admin_list_sea" class="form-search form-horizontal" id="list-filter" method="post" action="{:url('admin/News/news_list')}">
			<div class="row maintop">
				<div class="col-xs-12 col-sm-12 maintop">
					<select name="keytype">
						<option value="news_title" {if condition="($keytype eq 'news_title') or ($keytype eq '')"}selected{/if}>按标题</option>
						<option value="news_auto" {if condition="$keytype eq 'news_auto'"}selected{/if}>按发布人ID</option>
						<option value="news_author" {if condition="$keytype eq 'news_author'"}selected{/if}>按发布人名</option>
					</select>
					<select name="news_columnid" class="ajax_change">
						<option value="">按栏目</option>
						{foreach name="menu" item="vo"}
							<option value="{$vo.id}" {if condition="$vo.menu_type eq 1"}class="bgccc"{else/}class="bgc"{/if} {if condition="$news_columnid eq $vo['id']"}selected{/if}>{$vo.lefthtml}{$vo.menu_name} {if condition="$vo.menu_type eq 1"}(频道页){/if}</option>
						{/foreach}
					</select>
					{if condition="config('lang_switch_on')"}
					<select name="news_l" class="ajax_change">
						<option value="">按语言</option>
						<option value="zh-cn" {if condition="$news_l eq 'zh-cn'"}selected="selected"{/if}>中文</option>
						<option value="en-us" {if condition="$news_l eq 'en-us'"}selected="selected"{/if} >英语</option>
					</select>
					{/if}
					<select name="diyflag" class="ajax_change">
						<option value="">按属性</option>
						{foreach name="diyflag" item="v"}
							<option value="{$v.diyflag_value}" {if condition="$diyflag_check eq $v['diyflag_value']"}selected{/if}>{$v.diyflag_name}({$v.diyflag_value})</option>
						{/foreach}
					</select>
					<select name="opentype_check" class="ajax_change">
						<option value="">状态</option>
						<option value="1" {if condition="$opentype_check eq '1'"}selected="selected"{/if}>已审</option>
						<option value="0" {if condition="$opentype_check eq '0'"}selected="selected"{/if} >未审</option>
					</select>
				</div>

				<div class="col-xs-12 col-sm-5 hidden-xs btn-sespan">
					<div class="input-group">
										<span class="input-group-addon">
											<i class="glyphicon glyphicon-calendar fa fa-calendar"></i>
										</span>
						<input type="text"  name="reservation" id="reservation" class="sl-date" value="{$sldate}" placeholder="点击选择日期范围"/>
					</div>
				</div>


				<div class="col-xs-8 col-sm-4 btn-sespan">
					<div class="input-group">
									<span class="input-group-addon">
										<i class="ace-icon fa fa-check"></i>
									</span>
						<input type="text" name="key" id="key" class="form-control search-query admin_sea" value="{$keyy}" placeholder="输入需查询的关键字" />
									<span class="input-group-btn">
										<button type="submit" class="btn btn-xs btm-input btn-purple ajax-search-form">
											<span class="ace-icon fa fa-search icon-on-right bigger-110"></span>
											搜索
										</button>
									</span>
					</div>
				</div>

				<div class="input-group-btn">
					<a href="{:url('admin/News/news_list')}">
						<button type="button" class="btn btn-xs all-btn btn-purple ajax-display-all">
							<span class="ace-icon fa fa-globe icon-on-right bigger-110"></span>
							显示全部
						</button>
					</a>
				</div>


			</div>
		</form>



		<div class="row">
			<div class="col-xs-12">
				<div>
					<form id="alldel" name="alldel" method="post" action="{:url('admin/News/news_alldel')}" >
						<input name="p" id="p" value="{:input('p',1)}" type="hidden" />
						<div class="table-responsive">
							<table class="table table-striped table-bordered table-hover" id="dynamic-table">
								<thead>
								<tr>
									<th class="hidden-xs center">
										<label class="pos-rel">
											<input type="checkbox" class="ace"  id='chkAll' onclick='CheckAll(this.form)' value="全选"/>
											<span class="lbl"></span>															</label>											</th>
									
									<th class="hidden-xs">排序</th>
									<th class="hidden-xs">ID</th>
									<th>文章标题</th>
									<th class="hidden-sm hidden-xs">所属栏目</th>
									<th class="hidden-sm hidden-xs">文章属性</th>
									<th class="hidden-xs">审核</th>
									<th class="hidden-xs">发布时间</th>
									<th style="border-right:#CCC solid 1px;">操作</th>
								</tr>
								</thead>

								<tbody id="ajax-data">
									{include file="news/ajax_news_list"/}
								</tbody>
							</table>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div><!-- /.page-content -->
{/block}
{block name="scripts"}
	<script type="text/javascript" src="__PUBLIC__/sldate/moment.js"></script>
	<script type="text/javascript" src="__PUBLIC__/sldate/daterangepicker.js"></script>
    <script type="text/javascript">
        $('#reservation').daterangepicker(null, function (start, end, label) {
            console.log(start.toISOString(), end.toISOString(), label);
        });
    </script>
{/block}
